FROM ubuntu:focal

RUN sed -i s/deb.debian.org/mirrors.aliyun.com/g /etc/apt/sources.list  && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
RUN apt update && apt-get install -y iputils-ping telnet net-tools openvpn

RUN rm -rf /var/lib/apt/lists/*

COPY bonc_shanxi.ovpn /etc/openvpn/client/
COPY certs/ca.crt /etc/openvpn/client/
COPY certs/ta.key /etc/openvpn/client/
COPY user.txt /etc/openvpn/client/

WORKDIR /etc/openvpn/client/

CMD ["openvpn", "/etc/openvpn/client/bonc_shanxi.ovpn"]
